﻿using System;

namespace Program23
{
    class Program
    {
        //ref能够将一个变量带入方法中进行改变
        static void Main(string[] args)
        {
            decimal salary = 8000.0M;
            Charge(ref salary);
            Console.WriteLine("这个月工资为{0,8:C2}元",salary);
        }
        public static void Charge(ref decimal s)
        {
            s -= 500;
            Console.WriteLine("这个月扣款为{0,8:C2}元", 500);
        }
    }
}
